import {MockMethod} from 'vite-plugin-mock'
import {baseApi} from "./config"

export default [
    { // 登录系统
        url: `${baseApi}/system/login`,
        method: 'post',
        response: () => {
            return {
                "code": 0,
                "message": "",
                "data": {
                    "userInfo": {
                        "id": 31,
                        "userName": "demo",
                        "userNickname": "李四",
                        "userPassword": "",
                        "userSalt": "46PvWe1Sl7",
                        "userStatus": 1,
                        "isAdmin": 1,
                        "avatar": "upload_file/2022-11-11/co9copop81co0gysbz.jpg",
                        "deptId": 109
                    },
                    "token": "7ZUSfVIf2HyYjcv86SKPPs29v003ECPEScsdYsYYqO1OX7TJEtr+S2lU9CcEhck09n+XC4LL5CKsZ5xqmRTR0dTxU0fZofvlpNyEK/pDUDgZyCxYoRidKScwvrsMM0xqS3QWw2dIV0UerNLJ3KWWVQ==",
                    "menuList": [
                        {
                            "id": 17,
                            "pid": 0,
                            "name": "outLink",
                            "component": "layout/routerView/parent",
                            "path": "/demo/outLink",
                            "meta": {
                                "icon": "iconfont icon-zhongduancanshu",
                                "title": "外链测试",
                                "isLink": "",
                                "isHide": false,
                                "isKeepAlive": true,
                                "isAffix": false,
                                "isIframe": false
                            },
                            "children": [
                                {
                                    "id": 16,
                                    "pid": 17,
                                    "name": "aliyun",
                                    "component": "layout/routerView/iframes",
                                    "path": "/demo/outLink/aliyun",
                                    "meta": {
                                        "icon": "iconfont icon-diannao1",
                                        "title": "阿里云-iframe",
                                        "isLink": "https://www.aliyun.com/daily-act/ecs/activity_selection?spm=5176.8789780.J_3965641470.5.568845b58KHj51",
                                        "isHide": false,
                                        "isKeepAlive": true,
                                        "isAffix": false,
                                        "isIframe": true
                                    },
                                    "children": []
                                },
                                {
                                    "id": 18,
                                    "pid": 17,
                                    "name": "tenyun",
                                    "component": "layout/routerView/link",
                                    "path": "/demo/outLink/tenyun",
                                    "meta": {
                                        "icon": "iconfont icon-shouye_dongtaihui",
                                        "title": "腾讯云-外链",
                                        "isLink": "https://cloud.tencent.com/act/new?cps_key=20b1c3842f74986b2894e2c5fcde7ea2&fromSource=gwzcw.3775555.3775555.3775555&utm_id=gwzcw.3775555.3775555.3775555&utm_medium=cpc",
                                        "isHide": false,
                                        "isKeepAlive": true,
                                        "isAffix": false,
                                        "isIframe": false
                                    },
                                    "children": []
                                }
                            ]
                        },
                        {
                            "id": 1,
                            "pid": 0,
                            "name": "apiV1SystemAuth",
                            "component": "layout/routerView/parent",
                            "path": "/system/auth",
                            "meta": {
                                "icon": "ele-Stamp",
                                "title": "权限管理",
                                "isLink": "",
                                "isHide": false,
                                "isKeepAlive": true,
                                "isAffix": false,
                                "isIframe": false
                            },
                            "children": [
                                {
                                    "id": 2,
                                    "pid": 1,
                                    "name": "apiV1SystemAuthMenuList",
                                    "component": "system/menu/index",
                                    "path": "/system/auth/menuList",
                                    "meta": {
                                        "icon": "ele-Calendar",
                                        "title": "菜单管理",
                                        "isLink": "",
                                        "isHide": false,
                                        "isKeepAlive": true,
                                        "isAffix": false,
                                        "isIframe": false
                                    },
                                    "children": []
                                },
                                {
                                    "id": 10,
                                    "pid": 1,
                                    "name": "apiV1SystemRoleList",
                                    "component": "system/role/index",
                                    "path": "/system/auth/roleList",
                                    "meta": {
                                        "icon": "iconfont icon-juxingkaobei",
                                        "title": "角色管理",
                                        "isLink": "",
                                        "isHide": false,
                                        "isKeepAlive": true,
                                        "isAffix": false,
                                        "isIframe": false
                                    },
                                    "children": []
                                },
                                {
                                    "id": 15,
                                    "pid": 1,
                                    "name": "apiV1SystemDeptList",
                                    "component": "system/dept/index",
                                    "path": "/system/auth/deptList",
                                    "meta": {
                                        "icon": "iconfont icon-siweidaotu",
                                        "title": "部门管理",
                                        "isLink": "",
                                        "isHide": false,
                                        "isKeepAlive": true,
                                        "isAffix": false,
                                        "isIframe": false
                                    },
                                    "children": []
                                },
                                {
                                    "id": 22,
                                    "pid": 1,
                                    "name": "apiV1SystemPostList",
                                    "component": "system/post/index",
                                    "path": "/system/auth/postList",
                                    "meta": {
                                        "icon": "iconfont icon-neiqianshujuchucun",
                                        "title": "岗位管理",
                                        "isLink": "",
                                        "isHide": false,
                                        "isKeepAlive": true,
                                        "isAffix": false,
                                        "isIframe": false
                                    },
                                    "children": []
                                },
                                {
                                    "id": 26,
                                    "pid": 1,
                                    "name": "apiV1SystemUserList",
                                    "component": "system/user/index",
                                    "path": "/system/auth/user/list",
                                    "meta": {
                                        "icon": "ele-User",
                                        "title": "用户管理",
                                        "isLink": "",
                                        "isHide": false,
                                        "isKeepAlive": true,
                                        "isAffix": false,
                                        "isIframe": false
                                    },
                                    "children": []
                                }
                            ]
                        },
                        {
                            "id": 27,
                            "pid": 0,
                            "name": "apiV1SystemDict",
                            "component": "layout/routerView/parent",
                            "path": "/system/dict",
                            "meta": {
                                "icon": "iconfont icon-shuxingtu",
                                "title": "系统配置",
                                "isLink": "",
                                "isHide": false,
                                "isKeepAlive": true,
                                "isAffix": false,
                                "isIframe": false
                            },
                            "children": [
                                {
                                    "id": 28,
                                    "pid": 27,
                                    "name": "apiV1SystemDictTypeList",
                                    "component": "system/dict/index",
                                    "path": "/system/dict/type/list",
                                    "meta": {
                                        "icon": "iconfont icon-crew_feature",
                                        "title": "字典管理",
                                        "isLink": "",
                                        "isHide": false,
                                        "isKeepAlive": true,
                                        "isAffix": false,
                                        "isIframe": false
                                    },
                                    "children": []
                                },
                                {
                                    "id": 29,
                                    "pid": 27,
                                    "name": "apiV1SystemDictDataList",
                                    "component": "system/dict/dataList",
                                    "path": "/system/dict/data/list/:dictType",
                                    "meta": {
                                        "icon": "iconfont icon-putong",
                                        "title": "字典数据管理",
                                        "isLink": "",
                                        "isHide": true,
                                        "isKeepAlive": true,
                                        "isAffix": false,
                                        "isIframe": false
                                    },
                                    "children": []
                                },
                                {
                                    "id": 30,
                                    "pid": 27,
                                    "name": "apiV1SystemConfigList",
                                    "component": "system/config/index",
                                    "path": "/system/config/list",
                                    "meta": {
                                        "icon": "ele-Cherry",
                                        "title": "参数管理",
                                        "isLink": "",
                                        "isHide": false,
                                        "isKeepAlive": true,
                                        "isAffix": false,
                                        "isIframe": false
                                    },
                                    "children": []
                                }
                            ]
                        },
                        {
                            "id": 31,
                            "pid": 0,
                            "name": "apiV1SystemMonitor",
                            "component": "layout/routerView/parent",
                            "path": "/system/monitor",
                            "meta": {
                                "icon": "iconfont icon-xuanzeqi",
                                "title": "系统监控",
                                "isLink": "",
                                "isHide": false,
                                "isKeepAlive": true,
                                "isAffix": false,
                                "isIframe": false
                            },
                            "children": [
                                {
                                    "id": 32,
                                    "pid": 31,
                                    "name": "apiV1SystemMonitorServer",
                                    "component": "system/monitor/server/index",
                                    "path": "/system/monitor/server",
                                    "meta": {
                                        "icon": "iconfont icon-shuju",
                                        "title": "服务监控",
                                        "isLink": "",
                                        "isHide": false,
                                        "isKeepAlive": true,
                                        "isAffix": false,
                                        "isIframe": false
                                    },
                                    "children": []
                                },
                                {
                                    "id": 34,
                                    "pid": 31,
                                    "name": "apiV1SystemLoginLogList",
                                    "component": "system/monitor/loginLog/index",
                                    "path": "/system/monitor/loginLog",
                                    "meta": {
                                        "icon": "ele-Finished",
                                        "title": "登录日志",
                                        "isLink": "",
                                        "isHide": false,
                                        "isKeepAlive": true,
                                        "isAffix": false,
                                        "isIframe": false
                                    },
                                    "children": []
                                },
                                {
                                    "id": 38,
                                    "pid": 31,
                                    "name": "apiV1SystemOperLogList",
                                    "component": "system/monitor/operLog/index",
                                    "path": "/system/monitor/operLog",
                                    "meta": {
                                        "icon": "iconfont icon-bolangnengshiyanchang",
                                        "title": "操作日志",
                                        "isLink": "",
                                        "isHide": false,
                                        "isKeepAlive": true,
                                        "isAffix": false,
                                        "isIframe": false
                                    },
                                    "children": []
                                },
                                {
                                    "id": 39,
                                    "pid": 31,
                                    "name": "apiV1SystemOnlineList",
                                    "component": "system/monitor/userOnline/index",
                                    "path": "/system/monitor/userOnlie",
                                    "meta": {
                                        "icon": "iconfont icon-skin",
                                        "title": "在线用户",
                                        "isLink": "",
                                        "isHide": false,
                                        "isKeepAlive": true,
                                        "isAffix": false,
                                        "isIframe": false
                                    },
                                    "children": []
                                }
                            ]
                        }
                    ],
                    "permissions": [
                        "*/*/*"
                    ]
                }
            }
        }
    },
    { // 退出系统
        url: `${baseApi}/system/logout`,
        method: 'get',
        response: () => {
            return {
                "code": 0,
                "message": "",
                "data": null
            }
        }
    },
    {  // 获取验证码
        url: `${baseApi}/pub/captcha/get`,
        method: "get",
        response: () => {
            return {
                code: 0,
                message: "",
                data: {
                    key: "9HBGRg6N6nKkU1F1YRfG",
                    img: ""
                }
            }
        }
    },
] as MockMethod[]
